

export default {
  beforeRouteEnter(to, from, next) {
    const token = sessionStorage.getItem("token");
    if (!token) {
      next("/login");
    } else {
      next();
      window.location.href =
        window.location.origin + "/" + window.location.hash;
    }
  },
};
